﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<QLDAOL.ModelView.LogonModel>" %>
<div id="wapper_logon">
<% if (Session["user_logon_name"] == null)
   { %>
    <div id="div_logon">
    	<%using (Html.BeginForm())
       {%>
        <table>
                <tr>
                    <td>
                        <label>User name</label>
                    </td>
                    <td>
                        <%: Html.TextBoxFor(m => m.username)%>
                        <%: Html.ValidationMessageFor(m => m.username)%>
                    </td>
                    <td>
                        <label>Password</label>
                    </td>
                    <td>
                        <%: Html.PasswordFor(m => m.password)%>
                         <%: Html.ValidationMessageFor(m => m.password)%>
                    </td>
                    <td>
                       <input type="submit" value="Login" id="btn_login" />
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td>Quên mật khẩu</td>
                    <td></td>
                    <td><%= Html.ActionLink("Đăng kí","Register") %></td>
                </tr>
         </table>
         <% } %>
    </div>
   <%}
   else
   { %>
    <div id="logedin">
        <table>
            <tr>
                <td>Xin chào :</td>
                 <td> <%= Session["user_logon_name"]%></td>
                 <td><%= Html.ActionLink("Cá nhân","UserPage","User") %></td>
                  <td><%= Html.ActionLink("Logout","Logout") %></td>
                  <td><%= Html.ActionLink("Message", "InBox", "InBox")%></td>
            </tr>
        </table>
    </div>
    <%} %>
</div>

